package com.iafme.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author summer
 * @version 1.0
 * @date 2025/4/8 17:18
 */
public class EmailUtils {

    public static String email(String emailStr) {
        String emailPattern = "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}";
        Pattern pattern = Pattern.compile(emailPattern);
        Matcher matcher = pattern.matcher(emailStr);
        String email="";
        while (matcher.find()) {
            email=matcher.group();
        }
        return email;
    }


}
